package com.hmall.user.context;

public class BaseContext {

    private static ThreadLocal<Long> threadLocal =new ThreadLocal<>();


    public static void setCurrentUserId(Long id){
        threadLocal.set(id);
    }

    public static Long getCurrentUserId(){
        return threadLocal.get();
    }

    public static void removeCurrentUserId(){
        threadLocal.remove();
    }



}
